//字符串替换
class StringFormat {
public:
    string formatString(string A, int n, vector<char> arg, int m) {
        string res = "";
        int tmp = 0;
        for(int i = 0;i < n;i++)
        {
            if(A[i] == '%')
            {
                res.push_back(arg[tmp++]);
            }
            if(A[i] != '%' && A[i] != 's')
            {
                res.push_back(A[i]);
            }
        }
        while(tmp < arg.size())
        {
            res.push_back(arg[tmp++]);
        }
        return res;
    }
};